package com.pms.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.pms.dao.JobMapper;
import com.pms.pojo.Post;
import com.pms.service.JobService;

@Service
public class JobServiceImpl implements JobService{

	@Autowired
	private JobMapper jobMapper;

	@Override
	public Post getJobByPostId(int deptId) {
		Post Job = jobMapper.getJobByPostId(deptId);
		return Job;
	}

	@Override
	public List<Post> getJobByPostName(String deptName) {
		List<Post> JobList = jobMapper.getJobByPostName(deptName);
		return JobList;
	}

	@Override
	public List<Post> getJobByPostType(int deptType) {
		List<Post> JobList = jobMapper.getJobByPostType(deptType);
		return JobList;
	}

	@Override
	public List<Post> getJobList() {
		List<Post> JobList = jobMapper.getJobList();
		return JobList;
	}

	@Override
	public void insertPost(Post job) {
		jobMapper.insertJob(job);
		
	}

	@Override
	public void deleteJob(int deptId) {
		jobMapper.deleteJob(deptId);
		
	}

	@Override
	public void updateJob(Post Job) {
		jobMapper.updateJob(Job);
		
	}

	@Override
	public List<Post> getJobListByCondition(Post Job) {
		List<Post> JobList = jobMapper.getJobListByCondition(Job);
		return JobList;
	}
	
	
}
